package com.westcom.secritycheck.bean;

import lombok.Getter;
import lombok.Setter;
import com.westcom.secritycheck.constants.Constants.*;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;


/*
 * auth:zoupeng
 * date:20180904
 * */
@Getter
@Setter
public class Passenger
{
    private String id;
    private long age;
    private PassengerType type = PassengerType.normal;
    private long inLineTimestamp;
    public Passenger()
    {}
    public Passenger(String id,long age,PassengerType type)
    {
        this.id = id;
        this.age = age;
        this.type = type;
    }
    @Override
    public String toString()
    {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SS");
        return String.format("%s,%d,%s,%s",id,age,null== type?"":type.getValue(),sdf.format(new Date(this.inLineTimestamp)));
    }
}
